<template>
	<view class="page">
		<view class="pay-price" style="padding-top: 120rpx;">
			<view class="icon">
				<image src="/static/pay_success.png" mode=""></image>
			</view>
			<view class="price-data">
				<view class="list">
					<view class="title">支付方式</view>
					<view class="content">：{{zhifu}}</view>
				</view>
				<!-- <view class="list">
					<view class="title">支付金额</view>
					<view class="content" v-if="goods_type!=3">：￥{{price}}</view>
					<view class="content" v-if="goods_type==3">：{{price}}礼品卡</view>
				</view> -->
			</view>
		</view>
		<!-- 跳转按钮 -->
		<view class="skip-btn">
			<view class="btn" @click="onSkip(0)">我的订单</view>
			<view class="btn" @click="onSkip(1)">返回首页</view>
		</view>
		<!-- 为你推荐 -->
		<!-- <view class="recommend-info">
			<view class="recommend-title">
				<view class="title">
					<image src="/static/wntj_title.png" mode=""></image>
				</view>
			</view>
			<view class="goods-list">
				<view class="list" v-for="(item,index) in goodsList" @click="onSkip('goods')" :key="index">
					<view class="pictrue">
						<image :src="item.img" mode="heightFix"></image>
					</view>
					<view class="title-tag">
						<view class="tag">
							<text v-if="item.is_goods === 1">特价</text>
							{{item.name}}
						</view>
					</view>
					<view class="price-info">
						<view class="user-price">
							<text class="min">￥</text>
							<text class="max">{{item.price}}</text>
						</view>
						<view class="vip-price">
							<image src="/static/vip_ico.png"></image>
							<text>￥{{item.vip_price}}</text>
						</view>
					</view>
				</view>
			</view>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				price:'',
				zhifu:'',
				goodsList: [],
				goods_type:''
			}
		},
		onLoad(e) {
			this.price = e.price
			this.zhifu = e.zhifu
			this.goods_type = e.goods_type
		},
		methods: {
			/**
			 * @param {Number} type 0 订单 1 首页
			 */
			onSkip(type) {
				switch (type) {
					case 0:
						uni.redirectTo({
							url: '/pages/MyOrderList/MyOrderList?type=0'
						})
						break;
					case 1:
						uni.switchTab({
							url: '/pages/home/home'
						})
						break;
				}
			}
		}
	}
</script>

<style scoped lang="scss">
	@import 'PayResult.scss';
</style>